package oop.day04;

public class StaticTest
{
    public static void main(String[] args)
    {
        StaticVar staticVar = new StaticVar();
        staticVar.show();
        StaticVar staticVar1 = new StaticVar();
        staticVar.show();
        StaticVar staticVar2 = new StaticVar();
        staticVar.show();
        StaticVar staticVar3 = new StaticVar();
        staticVar.show();
        StaticVar staticVar4 = new StaticVar();
        staticVar.show();
        // 常常通过类名来访问
        System.out.println("StaticVar.b = " + StaticVar.b);
        System.out.println("------------------------------------------");
        StaticBlock staticBlock  = new StaticBlock();    // 静态块只加载一次  在类载入方法区的时候
        StaticBlock staticBlock1 = new StaticBlock();

    }
}
